/*
 * copyright (c) 2009 Alexandr [Sn@ble] Surnin
 *
 * This file is part of CVP.
 *
 * CVP is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * CVP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You can read the full version of GNU LGPL in
 * http://www.gnu.org/copyleft/lesser.html
 */


#ifndef TRACKHEADER_H
#define TRACKHEADER_H

#include <QPainter>
#include <QPen>
#include <QMenu>
#include <QAction>
#include <QContextMenuEvent>

#include <QWidget>


/** Track Header
  * \author Alexandr [Sn@ble] Surnin
  * Draws track information, like
  * Track name, track type, e.t.c
  */
class TrackHeader : public QWidget {

public:
    TrackHeader(QWidget *parent = 0);

public slots:

    /** Rename track
      */
    void renameTrack();


    /** Create context menu actions
      */
    void createActions();



protected:
    void paintEvent(QPaintEvent *event);
    void contextMenuEvent(QContextMenuEvent *event);

private:
    QAction *newAction;
    QAction *renameAction;
    QAction *closeAction;

    QString trackName;
};

#endif // TRACKHEADER_H
